<?php

namespace app\models;

use Yii;

/**
 * This is the model class for table "t_sys_api".
 *
 * @property string $id
 * @property string $name
 * @property string $code
 * @property string $module
 * @property string $version
 * @property string $url
 * @property string $client
 * @property string $demo
 * @property int $sequence
 * @property string $note
 * @property string $exception
 * @property string $subject
 */
class TSysApi extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 't_sys_api';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['sequence'], 'integer'],
            [['name', 'code', 'module'], 'string', 'max' => 100],
            [['version', 'client'], 'string', 'max' => 10],
            [['url'], 'string', 'max' => 255],
            [['demo'], 'string', 'max' => 4000],
            [['note', 'exception', 'subject'], 'string', 'max' => 1000],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => Yii::t('app', 'ID'),
            'name' => Yii::t('app', 'Name'),
            'code' => Yii::t('app', 'Code'),
            'module' => Yii::t('app', '模块'),
            'version' => Yii::t('app', '版本'),
            'url' => Yii::t('app', 'Url'),
            'client' => Yii::t('app', '客户端'),
            'demo' => Yii::t('app', 'Demo'),
            'sequence' => Yii::t('app', '排序'),
            'note' => Yii::t('app', '描述'),
            'exception' => Yii::t('app', '状态'),
            'subject' => Yii::t('app', '二级名称'),
        ];
    }
}
